home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 53 / IOPROG_53.ISO / soft / c++ / xceedftp.exe / Samples / Visual Basic / MethodDemo / frmMethodDemo.frm (.txt) next >
Encoding:
Visual Basic Form  |  2000-10-05  |  50.5 KB  |  1,333 lines

  1. VERSION 5.00
  2. Object = "{FF8DA174-3574-11D4-8068-0060082AE372}#1.0#0"; "XCEEDFTP.DLL"
  3. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
  4. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  5. Begin VB.Form frmMethodDemo 
  6.    BorderStyle     =   1  'Fixed Single
  7.    Caption         =   "Xceed FTP Library - Method Demonstrator sample application"
  8.    ClientHeight    =   7260
  9.    ClientLeft      =   45
  10.    ClientTop       =   345
  11.    ClientWidth     =   11790
  12.    Icon            =   "frmMethodDemo.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   7260
  16.    ScaleWidth      =   11790
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin ComctlLib.ProgressBar barGlobal 
  19.       Height          =   255
  20.       Left            =   7200
  21.       TabIndex        =   78
  22.       Top             =   6960
  23.       Width           =   4335
  24.       _ExtentX        =   7646
  25.       _ExtentY        =   450
  26.       _Version        =   327682
  27.       Appearance      =   0
  28.    End
  29.    Begin ComctlLib.ProgressBar barFile 
  30.       Height          =   255
  31.       Left            =   1080
  32.       TabIndex        =   77
  33.       Top             =   6960
  34.       Width           =   4695
  35.       _ExtentX        =   8281
  36.       _ExtentY        =   450
  37.       _Version        =   327682
  38.       Appearance      =   0
  39.    End
  40.    Begin VB.Frame frmInfo 
  41.       Caption         =   "Information about..."
  42.       Height          =   1815
  43.       Left            =   120
  44.       TabIndex        =   73
  45.       Top             =   5040
  46.       Width           =   4335
  47.       Begin VB.Label lblInfo 
  48.          Height          =   1335
  49.          Left            =   120
  50.          TabIndex        =   74
  51.          Top             =   360
  52.          Width           =   4095
  53.       End
  54.    End
  55.    Begin TabDlg.SSTab tabMethods 
  56.       Height          =   4935
  57.       Left            =   4560
  58.       TabIndex        =   20
  59.       Top             =   120
  60.       Width           =   7125
  61.       _ExtentX        =   12568
  62.       _ExtentY        =   8705
  63.       _Version        =   327681
  64.       Style           =   1
  65.       Tabs            =   5
  66.       TabsPerRow      =   5
  67.       TabHeight       =   529
  68.       WordWrap        =   0   'False
  69.       TabCaption(0)   =   "Connection"
  70.       TabPicture(0)   =   "frmMethodDemo.frx":030A
  71.       Tab(0).ControlEnabled=   -1  'True
  72.       Tab(0).Control(0)=   "Label7"
  73.       Tab(0).Control(0).Enabled=   0   'False
  74.       Tab(0).Control(1)=   "Label8"
  75.       Tab(0).Control(1).Enabled=   0   'False
  76.       Tab(0).Control(2)=   "Label9"
  77.       Tab(0).Control(2).Enabled=   0   'False
  78.       Tab(0).Control(3)=   "Label18"
  79.       Tab(0).Control(3).Enabled=   0   'False
  80.       Tab(0).Control(4)=   "btConnect"
  81.       Tab(0).Control(4).Enabled=   0   'False
  82.       Tab(0).Control(5)=   "btDisconnect"
  83.       Tab(0).Control(5).Enabled=   0   'False
  84.       Tab(0).ControlCount=   6
  85.       TabCaption(1)   =   "Folder handling"
  86.       TabPicture(1)   =   "frmMethodDemo.frx":0326
  87.       Tab(1).ControlEnabled=   0   'False
  88.       Tab(1).Control(0)=   "Label11"
  89.       Tab(1).Control(1)=   "Label12"
  90.       Tab(1).Control(2)=   "Label13"
  91.       Tab(1).Control(3)=   "Label16"
  92.       Tab(1).Control(4)=   "Label17"
  93.       Tab(1).Control(5)=   "txtFolderName"
  94.       Tab(1).Control(6)=   "btChangeCurrentFolder"
  95.       Tab(1).Control(7)=   "btChangeToParentFolder"
  96.       Tab(1).Control(8)=   "btCreateFolder"
  97.       Tab(1).Control(9)=   "btRemoveFolder"
  98.       Tab(1).ControlCount=   10
  99.       TabCaption(2)   =   "Folder contents"
  100.       TabPicture(2)   =   "frmMethodDemo.frx":0342
  101.       Tab(2).ControlEnabled=   0   'False
  102.       Tab(2).Control(0)=   "Label10"
  103.       Tab(2).Control(1)=   "Label20"
  104.       Tab(2).Control(2)=   "Label21"
  105.       Tab(2).Control(3)=   "Label19"
  106.       Tab(2).Control(4)=   "Label35"
  107.       Tab(2).Control(5)=   "Label36"
  108.       Tab(2).Control(6)=   "txtFolderMask"
  109.       Tab(2).Control(7)=   "btListFolderContents"
  110.       Tab(2).Control(8)=   "btGetFolderContents"
  111.       Tab(2).Control(9)=   "lstContents"
  112.       Tab(2).ControlCount=   10
  113.       TabCaption(3)   =   "File handling"
  114.       TabPicture(3)   =   "frmMethodDemo.frx":035E
  115.       Tab(3).ControlEnabled=   0   'False
  116.       Tab(3).Control(0)=   "Label22"
  117.       Tab(3).Control(1)=   "Label23"
  118.       Tab(3).Control(2)=   "Label24"
  119.       Tab(3).Control(3)=   "Label25"
  120.       Tab(3).Control(4)=   "Label26"
  121.       Tab(3).Control(5)=   "Label27"
  122.       Tab(3).Control(6)=   "txtRemoteFilename"
  123.       Tab(3).Control(7)=   "btRenameFile"
  124.       Tab(3).Control(8)=   "btDeleteFile"
  125.       Tab(3).Control(9)=   "txtNewFilename"
  126.       Tab(3).ControlCount=   10
  127.       TabCaption(4)   =   "File transfer"
  128.       TabPicture(4)   =   "frmMethodDemo.frx":037A
  129.       Tab(4).ControlEnabled=   0   'False
  130.       Tab(4).Control(0)=   "Label28"
  131.       Tab(4).Control(0).Enabled=   0   'False
  132.       Tab(4).Control(1)=   "Label29"
  133.       Tab(4).Control(1).Enabled=   0   'False
  134.       Tab(4).Control(2)=   "Label30"
  135.       Tab(4).Control(2).Enabled=   0   'False
  136.       Tab(4).Control(3)=   "Label31"
  137.       Tab(4).Control(3).Enabled=   0   'False
  138.       Tab(4).Control(4)=   "Label33"
  139.       Tab(4).Control(4).Enabled=   0   'False
  140.       Tab(4).Control(5)=   "Label32"
  141.       Tab(4).Control(5).Enabled=   0   'False
  142.       Tab(4).Control(6)=   "Label34"
  143.       Tab(4).Control(6).Enabled=   0   'False
  144.       Tab(4).Control(7)=   "txtSource"
  145.       Tab(4).Control(7).Enabled=   0   'False
  146.       Tab(4).Control(8)=   "txtDestination"
  147.       Tab(4).Control(8).Enabled=   0   'False
  148.       Tab(4).Control(9)=   "txtOffset"
  149.       Tab(4).Control(9).Enabled=   0   'False
  150.       Tab(4).Control(10)=   "chkRecursive"
  151.       Tab(4).Control(10).Enabled=   0   'False
  152.       Tab(4).Control(11)=   "btReceiveFile"
  153.       Tab(4).Control(11).Enabled=   0   'False
  154.       Tab(4).Control(12)=   "btSendFile"
  155.       Tab(4).Control(12).Enabled=   0   'False
  156.       Tab(4).Control(13)=   "btReceiveMultipleFiles"
  157.       Tab(4).Control(13).Enabled=   0   'False
  158.       Tab(4).Control(14)=   "btSendMultipleFiles"
  159.       Tab(4).Control(14).Enabled=   0   'False
  160.       Tab(4).Control(15)=   "chkAppend"
  161.       Tab(4).Control(15).Enabled=   0   'False
  162.       Tab(4).ControlCount=   16
  163.       Begin VB.CheckBox chkAppend 
  164.          Caption         =   "&Append to existing remote file"
  165.          Height          =   255
  166.          Left            =   -73200
  167.          TabIndex        =   65
  168.          Tag             =   "&h2800"
  169.          Top             =   3600
  170.          Width           =   2535
  171.       End
  172.       Begin VB.CommandButton btSendMultipleFiles 
  173.          Caption         =   "SendM&ultipleFiles"
  174.          Height          =   495
  175.          Left            =   -69960
  176.          TabIndex        =   72
  177.          Top             =   4200
  178.          Width           =   1815
  179.       End
  180.       Begin VB.CommandButton btReceiveMultipleFiles 
  181.          Caption         =   "Receive&MultipleFiles"
  182.          Height          =   495
  183.          Left            =   -69960
  184.          TabIndex        =   71
  185.          Top             =   3600
  186.          Width           =   1815
  187.       End
  188.       Begin VB.CommandButton btSendFile 
  189.          Caption         =   "&SendFile"
  190.          Height          =   495
  191.          Left            =   -69960
  192.          TabIndex        =   70
  193.          Top             =   3000
  194.          Width           =   1815
  195.       End
  196.       Begin VB.CommandButton btReceiveFile 
  197.          Caption         =   "&ReceiveFile"
  198.          Height          =   495
  199.          Left            =   -69960
  200.          TabIndex        =   69
  201.          Top             =   2400
  202.          Width           =   1815
  203.       End
  204.       Begin VB.CheckBox chkRecursive 
  205.          Caption         =   "&Process subfolders"
  206.          Height          =   255
  207.          Left            =   -73200
  208.          TabIndex        =   66
  209.          Tag             =   "&h3000"
  210.          Top             =   3840
  211.          Width           =   1695
  212.       End
  213.       Begin VB.TextBox txtOffset 
  214.          Height          =   315
  215.          Left            =   -74760
  216.          TabIndex        =   64
  217.          Tag             =   "&h0c00"
  218.          Text            =   "0"
  219.          Top             =   3720
  220.          Width           =   1215
  221.       End
  222.       Begin VB.TextBox txtDestination 
  223.          Height          =   315
  224.          Left            =   -74760
  225.          TabIndex        =   62
  226.          Tag             =   "&h3c00"
  227.          Top             =   3120
  228.          Width           =   4095
  229.       End
  230.       Begin VB.TextBox txtSource 
  231.          Height          =   315
  232.          Left            =   -74760
  233.          TabIndex        =   60
  234.          Tag             =   "&h3c00"
  235.          Top             =   2520
  236.          Width           =   4095
  237.       End
  238.       Begin VB.TextBox txtNewFilename 
  239.          Height          =   315
  240.          Left            =   -74760
  241.          TabIndex        =   51
  242.          Tag             =   "&h100"
  243.          Top             =   2520
  244.          Width           =   4095
  245.       End
  246.       Begin VB.CommandButton btDeleteFile 
  247.          Caption         =   "&DeleteFile"
  248.          Height          =   495
  249.          Left            =   -69960
  250.          TabIndex        =   56
  251.          Top             =   4200
  252.          Width           =   1815
  253.       End
  254.       Begin VB.CommandButton btRenameFile 
  255.          Caption         =   "&RenameFile"
  256.          Height          =   495
  257.          Left            =   -69960
  258.          TabIndex        =   55
  259.          Top             =   3600
  260.          Width           =   1815
  261.       End
  262.       Begin VB.TextBox txtRemoteFilename 
  263.          Height          =   315
  264.          Left            =   -74760
  265.          TabIndex        =   49
  266.          Tag             =   "&h300"
  267.          Top             =   1800
  268.          Width           =   4095
  269.       End
  270.       Begin ComctlLib.ListView lstContents 
  271.          Height          =   1455
  272.          Left            =   -74760
  273.          TabIndex        =   41
  274.          Top             =   2640
  275.          Width           =   4575
  276.          _ExtentX        =   8070
  277.          _ExtentY        =   2566
  278.          View            =   3
  279.          LabelEdit       =   1
  280.          LabelWrap       =   0   'False
  281.          HideSelection   =   0   'False
  282.          _Version        =   327682
  283.          ForeColor       =   -2147483640
  284.          BackColor       =   -2147483643
  285.          BorderStyle     =   1
  286.          Appearance      =   1
  287.          NumItems        =   2
  288.          BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
  289.             Key             =   ""
  290.             Object.Tag             =   ""
  291.             Text            =   "Item name"
  292.             Object.Width           =   5292
  293.          EndProperty
  294.          BeginProperty ColumnHeader(2) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
  295.             SubItemIndex    =   1
  296.             Key             =   ""
  297.             Object.Tag             =   ""
  298.             Text            =   "Type"
  299.             Object.Width           =   1764
  300.          EndProperty
  301.       End
  302.       Begin VB.CommandButton btGetFolderContents 
  303.          Caption         =   "GetFolderContents"
  304.          Height          =   495
  305.          Left            =   -69960
  306.          TabIndex        =   46
  307.          Top             =   4200
  308.          Width           =   1815
  309.       End
  310.       Begin VB.CommandButton btListFolderContents 
  311.          Caption         =   "ListFolderContents"
  312.          Height          =   495
  313.          Left            =   -69960
  314.          TabIndex        =   45
  315.          Top             =   3600
  316.          Width           =   1815
  317.       End
  318.       Begin VB.TextBox txtFolderMask 
  319.          Height          =   315
  320.          Left            =   -74760
  321.          TabIndex        =   39
  322.          Tag             =   "&h00c0"
  323.          Top             =   2040
  324.          Width           =   4095
  325.       End
  326.       Begin VB.CommandButton btRemoveFolder 
  327.          Caption         =   "&RemoveFolder"
  328.          Height          =   495
  329.          Left            =   -69960
  330.          TabIndex        =   36
  331.          Top             =   4200
  332.          Width           =   1815
  333.       End
  334.       Begin VB.CommandButton btCreateFolder 
  335.          Caption         =   "Create&Folder"
  336.          Height          =   495
  337.          Left            =   -69960
  338.          TabIndex        =   35
  339.          Top             =   3600
  340.          Width           =   1815
  341.       End
  342.       Begin VB.CommandButton btChangeToParentFolder 
  343.          Caption         =   "ChangeTo&ParentFolder"
  344.          Height          =   495
  345.          Left            =   -69960
  346.          TabIndex        =   34
  347.          Top             =   3000
  348.          Width           =   1815
  349.       End
  350.       Begin VB.CommandButton btChangeCurrentFolder 
  351.          Caption         =   "&ChangeCurrentFolder"
  352.          Height          =   495
  353.          Left            =   -69960
  354.          TabIndex        =   33
  355.          Top             =   2400
  356.          Width           =   1815
  357.       End
  358.       Begin VB.TextBox txtFolderName 
  359.          Height          =   315
  360.          Left            =   -74760
  361.          TabIndex        =   29
  362.          Tag             =   "&h0034"
  363.          Top             =   1800
  364.          Width           =   4095
  365.       End
  366.       Begin VB.CommandButton btDisconnect 
  367.          Caption         =   "&Disconnect"
  368.          Height          =   495
  369.          Left            =   5040
  370.          TabIndex        =   26
  371.          Top             =   4200
  372.          Width           =   1815
  373.       End
  374.       Begin VB.CommandButton btConnect 
  375.          Caption         =   "&Connect"
  376.          Height          =   495
  377.          Left            =   5040
  378.          TabIndex        =   25
  379.          Top             =   3600
  380.          Width           =   1815
  381.       End
  382.       Begin VB.Label Label36 
  383.          Caption         =   "Other related properties: ListParsingFlags."
  384.          Height          =   255
  385.          Left            =   -74760
  386.          TabIndex        =   43
  387.          Top             =   4440
  388.          Width           =   4575
  389.       End
  390.       Begin VB.Label Label35 
  391.          Caption         =   "Related events: ParsingListLine, ListingFolderItem."
  392.          Height          =   255
  393.          Left            =   -74760
  394.          TabIndex        =   42
  395.          Top             =   4200
  396.          Width           =   4575
  397.       End
  398.       Begin VB.Label Label34 
  399.          Caption         =   "Related events: ScanningFolder, FileMatched, ReceivingFile, ReplacingFile, SendingFile, FileTransferStatus."
  400.          Height          =   495
  401.          Left            =   -74760
  402.          TabIndex        =   67
  403.          Top             =   4200
  404.          Width           =   4575
  405.       End
  406.       Begin VB.Label Label32 
  407.          Caption         =   "Demonstrated methods:"
  408.          Height          =   255
  409.          Left            =   -69960
  410.          TabIndex        =   68
  411.          Top             =   2160
  412.          Width           =   1815
  413.       End
  414.       Begin VB.Label Label33 
  415.          Caption         =   $"frmMethodDemo.frx":0396
  416.          Height          =   855
  417.          Left            =   -74760
  418.          TabIndex        =   58
  419.          Top             =   1320
  420.          Width           =   6735
  421.       End
  422.       Begin VB.Label Label31 
  423.          Caption         =   "Starting offset:"
  424.          Height          =   255
  425.          Left            =   -74760
  426.          TabIndex        =   63
  427.          Top             =   3480
  428.          Width           =   1215
  429.       End
  430.       Begin VB.Label Label30 
  431.          Caption         =   "Destination filename (or folder for multiple transfer):"
  432.          Height          =   255
  433.          Left            =   -74760
  434.          TabIndex        =   61
  435.          Top             =   2880
  436.          Width           =   4095
  437.       End
  438.       Begin VB.Label Label29 
  439.          Caption         =   "Source filename (or file mask for multiple transfer):"
  440.          Height          =   255
  441.          Left            =   -74760
  442.          TabIndex        =   59
  443.          Top             =   2280
  444.          Width           =   4095
  445.       End
  446.       Begin VB.Label Label28 
  447.          Caption         =   $"frmMethodDemo.frx":0472
  448.          Height          =   855
  449.          Left            =   -74760
  450.          TabIndex        =   57
  451.          Top             =   480
  452.          Width           =   6615
  453.       End
  454.       Begin VB.Label Label27 
  455.          Caption         =   "Other related properties: None."
  456.          Height          =   255
  457.          Left            =   -74760
  458.          TabIndex        =   53
  459.          Top             =   4440
  460.          Width           =   4575
  461.       End
  462.       Begin VB.Label Label26 
  463.          Caption         =   "Related events: No specific events."
  464.          Height          =   255
  465.          Left            =   -74760
  466.          TabIndex        =   52
  467.          Top             =   4080
  468.          Width           =   4575
  469.       End
  470.       Begin VB.Label Label25 
  471.          Caption         =   "New filename:"
  472.          Height          =   255
  473.          Left            =   -74760
  474.          TabIndex        =   50
  475.          Top             =   2280
  476.          Width           =   1215
  477.       End
  478.       Begin VB.Label Label24 
  479.          Caption         =   "Demonstrated methods:"
  480.          Height          =   255
  481.          Left            =   -69960
  482.          TabIndex        =   54
  483.          Top             =   3360
  484.          Width           =   1815
  485.       End
  486.       Begin VB.Label Label23 
  487.          Caption         =   "Remote filename:"
  488.          Height          =   255
  489.          Left            =   -74760
  490.          TabIndex        =   48
  491.          Top             =   1560
  492.          Width           =   1335
  493.       End
  494.       Begin VB.Label Label22 
  495.          Caption         =   $"frmMethodDemo.frx":05A9
  496.          Height          =   855
  497.          Left            =   -74760
  498.          TabIndex        =   47
  499.          Top             =   480
  500.          Width           =   6615
  501.       End
  502.       Begin VB.Label Label19 
  503.          Caption         =   "Retrieved contents:"
  504.          Height          =   255
  505.          Left            =   -74760
  506.          TabIndex        =   40
  507.          Top             =   2400
  508.          Width           =   1575
  509.       End
  510.       Begin VB.Label Label21 
  511.          Caption         =   "Demonstrated methods:"
  512.          Height          =   255
  513.          Left            =   -69960
  514.          TabIndex        =   44
  515.          Top             =   3360
  516.          Width           =   1815
  517.       End
  518.       Begin VB.Label Label20 
  519.          Caption         =   "Folder mask:"
  520.          Height          =   255
  521.          Left            =   -74760
  522.          TabIndex        =   38
  523.          Top             =   1800
  524.          Width           =   1095
  525.       End
  526.       Begin VB.Label Label18 
  527.          Caption         =   "Demonstrated methods:"
  528.          Height          =   255
  529.          Left            =   5040
  530.          TabIndex        =   24
  531.          Top             =   3360
  532.          Width           =   1815
  533.       End
  534.       Begin VB.Label Label17 
  535.          Caption         =   "Demonstrated methods:"
  536.          Height          =   255
  537.          Left            =   -69960
  538.          TabIndex        =   32
  539.          Top             =   2160
  540.          Width           =   1815
  541.       End
  542.       Begin VB.Label Label16 
  543.          Caption         =   "Related events: No specific events."
  544.          Height          =   255
  545.          Left            =   -74760
  546.          TabIndex        =   30
  547.          Top             =   3840
  548.          Width           =   4575
  549.       End
  550.       Begin VB.Label Label13 
  551.          Caption         =   "Other related properties: None."
  552.          Height          =   255
  553.          Left            =   -74760
  554.          TabIndex        =   31
  555.          Top             =   4320
  556.          Width           =   4575
  557.       End
  558.       Begin VB.Label Label12 
  559.          Caption         =   "Folder name:"
  560.          Height          =   255
  561.          Left            =   -74760
  562.          TabIndex        =   28
  563.          Top             =   1560
  564.          Width           =   1095
  565.       End
  566.       Begin VB.Label Label11 
  567.          Caption         =   $"frmMethodDemo.frx":06DA
  568.          Height          =   855
  569.          Left            =   -74760
  570.          TabIndex        =   27
  571.          Top             =   480
  572.          Width           =   6615
  573.       End
  574.       Begin VB.Label Label10 
  575.          Caption         =   $"frmMethodDemo.frx":07D2
  576.          Height          =   1215
  577.          Left            =   -74760
  578.          TabIndex        =   37
  579.          Top             =   480
  580.          Width           =   6615
  581.       End
  582.       Begin VB.Label Label9 
  583.          Caption         =   "Related events: Disconnected."
  584.          Height          =   255
  585.          Left            =   240
  586.          TabIndex        =   22
  587.          Top             =   3600
  588.          Width           =   4575
  589.       End
  590.       Begin VB.Label Label8 
  591.          Caption         =   "Other related properties: AccountName, FirewallType, FirewallAddress, FirewallPort, FirewallUserName, FirewallPassword."
  592.          Height          =   615
  593.          Left            =   240
  594.          TabIndex        =   23
  595.          Top             =   4080
  596.          Width           =   4575
  597.       End
  598.       Begin VB.Label Label7 
  599.          Caption         =   $"frmMethodDemo.frx":099D
  600.          Height          =   615
  601.          Left            =   240
  602.          TabIndex        =   21
  603.          Top             =   480
  604.          Width           =   6615
  605.       End
  606.    End
  607.    Begin ComctlLib.StatusBar barStatus 
  608.       Align           =   2  'Align Bottom
  609.       Height          =   375
  610.       Left            =   0
  611.       TabIndex        =   79
  612.       Top             =   6885
  613.       Width           =   11790
  614.       _ExtentX        =   20796
  615.       _ExtentY        =   661
  616.       SimpleText      =   ""
  617.       _Version        =   327682
  618.       BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
  619.          NumPanels       =   2
  620.          BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
  621.             Object.Width           =   10231
  622.             MinWidth        =   10231
  623.             Text            =   "File progress:"
  624.             TextSave        =   "File progress:"
  625.             Key             =   ""
  626.             Object.Tag             =   ""
  627.          EndProperty
  628.          BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
  629.             Object.Width           =   10231
  630.             MinWidth        =   10231
  631.             Text            =   "Global progress:"
  632.             TextSave        =   "Global progress:"
  633.             Key             =   ""
  634.             Object.Tag             =   ""
  635.          EndProperty
  636.       EndProperty
  637.    End
  638.    Begin VB.ListBox lstMessages 
  639.       Height          =   1425
  640.       Left            =   4560
  641.       TabIndex        =   76
  642.       Top             =   5400
  643.       Width           =   7095
  644.    End
  645.    Begin VB.Frame frmOtherProperties 
  646.       Caption         =   "Other properties"
  647.       Height          =   1095
  648.       Left            =   120
  649.       TabIndex        =   9
  650.       Top             =   2040
  651.       Width           =   4335
  652.       Begin VB.OptionButton optASCII 
  653.          Caption         =   "ASCII"
  654.          Height          =   255
  655.          Left            =   2520
  656.          TabIndex        =   13
  657.          Tag             =   "&h3c00"
  658.          Top             =   480
  659.          Width           =   855
  660.       End
  661.       Begin VB.OptionButton optBinary 
  662.          Caption         =   "Binary"
  663.          Height          =   255
  664.          Left            =   2520
  665.          TabIndex        =   14
  666.          Tag             =   "&h3c00"
  667.          Top             =   720
  668.          Value           =   -1  'True
  669.          Width           =   855
  670.       End
  671.       Begin VB.CheckBox chkAllocateStorage 
  672.          Caption         =   "&AllocateStorage"
  673.          Height          =   255
  674.          Left            =   240
  675.          TabIndex        =   10
  676.          Tag             =   "&h2800"
  677.          Top             =   360
  678.          Width           =   1575
  679.       End
  680.       Begin VB.CheckBox chkPassiveMode 
  681.          Caption         =   "PassiveMode"
  682.          Height          =   255
  683.          Left            =   240
  684.          TabIndex        =   11
  685.          Tag             =   "&h3cc0"
  686.          Top             =   720
  687.          Width           =   1335
  688.       End
  689.       Begin VB.Label Label5 
  690.          Caption         =   "RepresentationType:"
  691.          Height          =   255
  692.          Left            =   2400
  693.          TabIndex        =   12
  694.          Top             =   240
  695.          Width           =   1575
  696.       End
  697.    End
  698.    Begin VB.Frame frmReadOnlyProperties 
  699.       Caption         =   "Read-only properties"
  700.       Height          =   1695
  701.       Left            =   120
  702.       TabIndex        =   15
  703.       Top             =   3240
  704.       Width           =   4335
  705.       Begin VB.TextBox txtCurrentState 
  706.          BackColor       =   &H8000000F&
  707.          Height          =   285
  708.          Left            =   240
  709.          TabIndex        =   19
  710.          Top             =   1200
  711.          Width           =   1815
  712.       End
  713.       Begin VB.TextBox txtCurrentFolder 
  714.          BackColor       =   &H8000000F&
  715.          Height          =   315
  716.          Left            =   240
  717.          TabIndex        =   17
  718.          Top             =   600
  719.          Width           =   3855
  720.       End
  721.       Begin VB.Label Label15 
  722.          Caption         =   "CurrentState:"
  723.          Height          =   255
  724.          Left            =   240
  725.          TabIndex        =   18
  726.          Top             =   960
  727.          Width           =   1095
  728.       End
  729.       Begin VB.Label Label14 
  730.          Caption         =   "CurrentFolder:"
  731.          Height          =   255
  732.          Left            =   240
  733.          TabIndex        =   16
  734.          Top             =   360
  735.          Width           =   1095
  736.       End
  737.    End
  738.    Begin VB.Frame frmConnectionProperties 
  739.       Caption         =   "Connection properties"
  740.       Height          =   1815
  741.       Left            =   120
  742.       TabIndex        =   0
  743.       Top             =   120
  744.       Width           =   4335
  745.       Begin VB.TextBox txtPassword 
  746.          Height          =   315
  747.          IMEMode         =   3  'DISABLE
  748.          Left            =   2280
  749.          PasswordChar    =   "*"
  750.          TabIndex        =   8
  751.          Tag             =   "&h0001"
  752.          Text            =   "quest"
  753.          Top             =   1320
  754.          Width           =   1815
  755.       End
  756.       Begin VB.TextBox txtUserName 
  757.          Height          =   315
  758.          Left            =   240
  759.          TabIndex        =   6
  760.          Tag             =   "&h0001"
  761.          Text            =   "anonymous"
  762.          Top             =   1320
  763.          Width           =   1815
  764.       End
  765.       Begin VB.TextBox txtServerAddress 
  766.          Height          =   315
  767.          Left            =   240
  768.          TabIndex        =   2
  769.          Tag             =   "&h0001"
  770.          Top             =   600
  771.          Width           =   2655
  772.       End
  773.       Begin VB.TextBox txtServerPort 
  774.          Height          =   315
  775.          Left            =   3120
  776.          TabIndex        =   4
  777.          Tag             =   "&h0001"
  778.          Text            =   "21"
  779.          Top             =   600
  780.          Width           =   975
  781.       End
  782.       Begin VB.Label Label4 
  783.          Caption         =   "Password:"
  784.          Height          =   255
  785.          Left            =   2280
  786.          TabIndex        =   7
  787.          Top             =   1080
  788.          Width           =   1815
  789.       End
  790.       Begin VB.Label Label3 
  791.          Caption         =   "UserName:"
  792.          Height          =   255
  793.          Left            =   240
  794.          TabIndex        =   5
  795.          Top             =   1080
  796.          Width           =   975
  797.       End
  798.       Begin VB.Label Label1 
  799.          Caption         =   "ServerAddress:"
  800.          Height          =   255
  801.          Left            =   240
  802.          TabIndex        =   1
  803.          Top             =   360
  804.          Width           =   1215
  805.       End
  806.       Begin VB.Label Label2 
  807.          Caption         =   "ServerPort:"
  808.          Height          =   255
  809.          Left            =   3120
  810.          TabIndex        =   3
  811.          Top             =   360
  812.          Width           =   975
  813.       End
  814.    End
  815.    Begin XceedFtpLibCtl.XceedFtp xFtp 
  816.       Left            =   11160
  817.       Top             =   5040
  818.       AccountName     =   ""
  819.       AllocateStorage =   0   'False
  820.       BackgroundProcessing=   0   'False
  821.       CommandLogFilename=   ""
  822.       EventFilter     =   8151
  823.       ListParsingFlags=   1
  824.       LocalDataAddress=   ""
  825.       LocalDataPort   =   0
  826.       PassiveMode     =   -1  'True
  827.       Password        =   "guest"
  828.       RepresentationType=   0
  829.       ServerAddress   =   ""
  830.       ServerPort      =   21
  831.       UserName        =   "anonymous"
  832.       FirewallType    =   0
  833.       FirewallAddress =   ""
  834.       FirewallPort    =   1080
  835.       FirewallUser    =   ""
  836.       FirewallPassword=   ""
  837.    End
  838.    Begin VB.Label Label6 
  839.       Caption         =   "Messages:"
  840.       Height          =   255
  841.       Left            =   4560
  842.       TabIndex        =   75
  843.       Top             =   5160
  844.       Width           =   1215
  845.    End
  846. Attribute VB_Name = "frmMethodDemo"
  847. Attribute VB_GlobalNameSpace = False
  848. Attribute VB_Creatable = False
  849. Attribute VB_PredeclaredId = True
  850. Attribute VB_Exposed = False
  851. ' Xceed FTP Library - Method Demonstrator sample application
  852. ' Copyright (c) 2000 Xceed Software Inc.
  853. ' [frmMethodDemo.frm]
  854. ' This form module contains all the code for this sample
  855. ' application's form.
  856. ' This file is part of the Xceed FTP Library samples applications.
  857. ' The source code in this file is only intended as a supplement
  858. ' to Xceed FTP Library's documentation, and is provided "as is",
  859. ' without warranty of any kind, either expressed or implied.
  860. Option Explicit
  861. ' Private utility methods
  862. Private Sub AddErrorMessage(ByVal lCode As Long, ByVal sDesc As String)
  863.   If lCode = 0 Then
  864.     Call lstMessages.AddItem("Operation completed successfully!")
  865.   Else
  866.     Call lstMessages.AddItem("Error 0x" & Hex(lCode) & ": " & sDesc)
  867.   End If
  868. End Sub
  869. Private Sub SetRelatedProperties(ByVal eMethod As EXceedFtpMethods)
  870.   Dim xCtrl As Control
  871.   Dim lVal As Long
  872.   For Each xCtrl In Controls
  873.     On Error Resume Next
  874.     lVal = 0
  875.     lVal = Val(xCtrl.Tag)
  876.     On Error GoTo 0
  877.     If lVal > 0 Then
  878.       If (lVal And eMethod) > 0 Then
  879.         xCtrl.BackColor = RGB(255, 128, 128)
  880.       ElseIf TypeOf xCtrl Is TextBox Then
  881.         xCtrl.BackColor = vbWindowBackground
  882.       Else
  883.         xCtrl.BackColor = vbButtonFace
  884.       End If
  885.     End If
  886.   Next xCtrl
  887. End Sub
  888. Private Sub UpdateReadOnlyProperties()
  889.   txtCurrentFolder.Text = xFtp.CurrentFolder
  890.   ' Since we do not use the Xceed Ftp Library in background processing mode,
  891.   ' we know the state can only be fstNotConnected or fstConnected. Only
  892.   ' map these two to text!
  893.   Select Case xFtp.CurrentState
  894.   Case fstNotConnected
  895.     txtCurrentState.Text = "Not connected"
  896.   Case fstConnected
  897.     txtCurrentState.Text = "Connected"
  898.   Case Else
  899.     txtCurrentState.Text = "Unexpected (" & CStr(xFtp.CurrentState) & ")"
  900.   End Select
  901. End Sub
  902. ' Form loading and unloading
  903. Private Sub Form_Load()
  904.   ' Some initializations
  905.   Call UpdateReadOnlyProperties
  906.   txtServerAddress.Text = xFtp.ServerAddress
  907.   txtServerPort.Text = CStr(xFtp.ServerPort)
  908.   txtUserName.Text = xFtp.UserName
  909.   txtPassword.Text = xFtp.Password
  910.   chkAllocateStorage.Value = IIf(xFtp.AllocateStorage, vbChecked, vbUnchecked)
  911.   chkPassiveMode.Value = IIf(xFtp.PassiveMode, vbChecked, vbUnchecked)
  912.   optASCII.Value = (xFtp.RepresentationType = frtASCII)
  913.   optBinary.Value = Not optASCII
  914. End Sub
  915. Private Sub Form_Unload(Cancel As Integer)
  916.   ' When we quit, we make sure to disconnect, to avoid a delay where the Xceed Ftp Library
  917.   ' waits for all references to be released.
  918.   If xFtp.CurrentState = fstConnected Then
  919.     On Error Resume Next
  920.     Call xFtp.Disconnect
  921.   End If
  922. End Sub
  923. ' MouseMove handling for color information
  924. Private Sub btChangeCurrentFolder_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  925.   Call SetRelatedProperties(cChangeCurrentFolder)
  926. End Sub
  927. Private Sub btChangeToParentFolder_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  928.   Call SetRelatedProperties(cChangeToParentFolder)
  929. End Sub
  930. Private Sub btConnect_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  931.   Call SetRelatedProperties(cConnect)
  932. End Sub
  933. Private Sub btCreateFolder_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  934.   Call SetRelatedProperties(cCreateFolder)
  935. End Sub
  936. Private Sub btDeleteFile_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  937.   Call SetRelatedProperties(cDeleteFile)
  938. End Sub
  939. Private Sub btDisconnect_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  940.   Call SetRelatedProperties(cDisconnect)
  941. End Sub
  942. Private Sub btGetFolderContents_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  943.   Call SetRelatedProperties(cGetFolderContents)
  944. End Sub
  945. Private Sub btListFolderContents_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  946.   Call SetRelatedProperties(cListFolderContents)
  947. End Sub
  948. Private Sub btReceiveFile_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  949.   Call SetRelatedProperties(cReceiveFile)
  950. End Sub
  951. Private Sub btReceiveMultipleFiles_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  952.   Call SetRelatedProperties(cReceiveMultipleFiles)
  953. End Sub
  954. Private Sub btRemoveFolder_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  955.   Call SetRelatedProperties(cRemoveFolder)
  956. End Sub
  957. Private Sub btRenameFile_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  958.   Call SetRelatedProperties(cRenameFile)
  959. End Sub
  960. Private Sub btSendFile_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  961.   Call SetRelatedProperties(cSendFile)
  962. End Sub
  963. Private Sub btSendMultipleFiles_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  964.   Call SetRelatedProperties(cSendMultipleFiles)
  965. End Sub
  966. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  967.   Call SetRelatedProperties(cNone)
  968. End Sub
  969. Private Sub frmConnectionProperties_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  970.   Call SetRelatedProperties(cNone)
  971. End Sub
  972. Private Sub frmInfo_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  973.   Call SetRelatedProperties(cNone)
  974. End Sub
  975. Private Sub frmOtherProperties_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  976.   Call SetRelatedProperties(cNone)
  977. End Sub
  978. Private Sub frmReadOnlyProperties_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  979.   Call SetRelatedProperties(cNone)
  980. End Sub
  981. Private Sub lstContents_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  982.   Call SetRelatedProperties(cNone)
  983. End Sub
  984. Private Sub lstMessages_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  985.   Call SetRelatedProperties(cNone)
  986. End Sub
  987. Private Sub tabMethods_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  988.   Call SetRelatedProperties(cNone)
  989. End Sub
  990. ' Disable keyboard on some edit fields
  991. Private Sub txtCurrentFolder_KeyPress(KeyAscii As Integer)
  992.   KeyAscii = 0
  993. End Sub
  994. Private Sub txtCurrentState_KeyPress(KeyAscii As Integer)
  995.   KeyAscii = 0
  996. End Sub
  997. ' Information about the control with the focus
  998. Private Sub chkAllocateStorage_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  999.   frmInfo.Caption = "Information about the 'AllocateStorage' property"
  1000.   lblInfo.Caption = cAllocateStorageInfo
  1001. End Sub
  1002. Private Sub chkAppend_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1003.   frmInfo.Caption = "Information about the append parameter"
  1004.   lblInfo.Caption = cAppendInfo
  1005. End Sub
  1006. Private Sub chkRecursive_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1007.   frmInfo.Caption = "Information about the process subfolders parameter"
  1008.   lblInfo.Caption = cProcessSubfoldersInfo
  1009. End Sub
  1010. Private Sub chkPassiveMode_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1011.   frmInfo.Caption = "Information about the 'PassiveMode' property"
  1012.   lblInfo.Caption = cPassiveModeInfo
  1013. End Sub
  1014. Private Sub optASCII_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1015.   frmInfo.Caption = "Information about the 'RepresentationType' property"
  1016.   lblInfo.Caption = cAsciiRepresentationTypeInfo
  1017. End Sub
  1018. Private Sub optBinary_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1019.   frmInfo.Caption = "Information about the 'RepresentationType' property"
  1020.   lblInfo.Caption = cBinaryRepresentationTypeInfo
  1021. End Sub
  1022. Private Sub txtDestination_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1023.   frmInfo.Caption = "Information about the destination filename or folder parameter"
  1024.   lblInfo.Caption = cDestinationFilenameInfo
  1025. End Sub
  1026. Private Sub txtFolderMask_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1027.   frmInfo.Caption = "Information about the folder mask parameter"
  1028.   lblInfo.Caption = cFolderMaskInfo
  1029. End Sub
  1030. Private Sub txtFolderName_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1031.   frmInfo.Caption = "Information about the folder name parameter"
  1032.   lblInfo.Caption = cFolderNameInfo
  1033. End Sub
  1034. Private Sub txtNewFilename_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1035.   frmInfo.Caption = "Information about the new filename parameter"
  1036.   lblInfo.Caption = cNewFilenameInfo
  1037. End Sub
  1038. Private Sub txtOffset_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1039.   frmInfo.Caption = "Information about the starting offset parameter"
  1040.   lblInfo.Caption = cOffsetInfo
  1041. End Sub
  1042. Private Sub txtPassword_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1043.   frmInfo.Caption = "Information about the 'Password' property"
  1044.   lblInfo.Caption = cPasswordInfo
  1045. End Sub
  1046. Private Sub txtRemoteFilename_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1047.   frmInfo.Caption = "Information about the remote filename parameter"
  1048.   lblInfo.Caption = cRemoteFilenameInfo
  1049. End Sub
  1050. Private Sub txtServerAddress_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1051.   frmInfo.Caption = "Information about the 'ServerAddress' property"
  1052.   lblInfo.Caption = cServerAddressInfo
  1053. End Sub
  1054. Private Sub txtServerPort_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1055.   frmInfo.Caption = "Information about the 'ServerPort' property"
  1056.   lblInfo.Caption = cServerPortInfo
  1057. End Sub
  1058. Private Sub txtSource_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1059.   frmInfo.Caption = "Information about the source filename or mask parameter"
  1060.   lblInfo.Caption = cSourceFilenameInfo
  1061. End Sub
  1062. Private Sub txtUserName_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1063.   frmInfo.Caption = "Information about the 'UserName' property"
  1064.   lblInfo.Caption = cUserNameInfo
  1065. End Sub
  1066. ' The actual method calls to the Xceed Ftp Library. The ActiveX uses the
  1067. ' error object to report error to you. You can either use an On Error Resume Next
  1068. ' or On Error Goto Label directive to handle errors.
  1069. Private Sub btConnect_Click()
  1070.   On Error GoTo LocalError
  1071.   ' Set required properties
  1072.   xFtp.ServerAddress = txtServerAddress.Text
  1073.   xFtp.ServerPort = txtServerPort.Text
  1074.   xFtp.UserName = txtUserName.Text
  1075.   xFtp.Password = txtPassword.Text
  1076.   ' Simply call Connect to tell the Xceed Ftp Control to connect to the
  1077.   ' specified server.
  1078.   Call xFtp.Connect
  1079. LocalError:
  1080.   Call AddErrorMessage(Err.Number, Err.Description)
  1081.   ' Update read-only properties
  1082.   Call UpdateReadOnlyProperties
  1083. End Sub
  1084. Private Sub btDisconnect_Click()
  1085.   On Error GoTo LocalError
  1086.   ' No specific property required
  1087.   ' Simply call the Disconnect method to disconnect from the FTP server
  1088.   Call xFtp.Disconnect
  1089. LocalError:
  1090.   Call AddErrorMessage(Err.Number, Err.Description)
  1091.   ' Update read-only properties
  1092.   Call UpdateReadOnlyProperties
  1093. End Sub
  1094. Private Sub btChangeCurrentFolder_Click()
  1095.   On Error GoTo LocalError
  1096.   ' No specific property required
  1097.   ' Simply call ChangeCurrentFolder with the folder name to change to
  1098.   Call xFtp.ChangeCurrentFolder(txtFolderName.Text)
  1099. LocalError:
  1100.   Call AddErrorMessage(Err.Number, Err.Description)
  1101.   ' Update read-only properties
  1102.   Call UpdateReadOnlyProperties
  1103. End Sub
  1104. Private Sub btChangeToParentFolder_Click()
  1105.   On Error GoTo LocalError
  1106.   ' No specific property required
  1107.   ' Simply call ChangeToParentFolder
  1108.   Call xFtp.ChangeToParentFolder
  1109. LocalError:
  1110.   Call AddErrorMessage(Err.Number, Err.Description)
  1111.   ' Update read-only properties
  1112.   Call UpdateReadOnlyProperties
  1113. End Sub
  1114. Private Sub btCreateFolder_Click()
  1115.   On Error GoTo LocalError
  1116.   ' No specific property required
  1117.   ' Simply call CreateFolder with the folder to create
  1118.   Call xFtp.CreateFolder(txtFolderName.Text)
  1119. LocalError:
  1120.   Call AddErrorMessage(Err.Number, Err.Description)
  1121.   ' Update read-only properties
  1122.   Call UpdateReadOnlyProperties
  1123. End Sub
  1124. Private Sub btRemoveFolder_Click()
  1125.   On Error GoTo LocalError
  1126.   ' No specific property required
  1127.   ' Simply call RemoveFolder with the new folder to create
  1128.   Call xFtp.RemoveFolder(txtFolderName.Text)
  1129. LocalError:
  1130.   Call AddErrorMessage(Err.Number, Err.Description)
  1131.   ' Update read-only properties
  1132.   Call UpdateReadOnlyProperties
  1133. End Sub
  1134. Private Sub btGetFolderContents_Click()
  1135.   On Error GoTo LocalError
  1136.   ' Set some properties
  1137.   xFtp.PassiveMode = (chkPassiveMode.Value = vbChecked)
  1138.   ' Empty list view
  1139.   lstContents.ListItems.Clear
  1140.   ' Simply call ListFolderContents with the file mask to look for
  1141.   Call xFtp.ListFolderContents(txtFolderMask.Text)
  1142. LocalError:
  1143.   Call AddErrorMessage(Err.Number, Err.Description)
  1144.   ' Update read-only properties
  1145.   Call UpdateReadOnlyProperties
  1146. End Sub
  1147. Private Sub btListFolderContents_Click()
  1148.   On Error GoTo LocalError
  1149.   ' Set some properties
  1150.   xFtp.PassiveMode = (chkPassiveMode.Value = vbChecked)
  1151.   ' Empty list view
  1152.   lstContents.ListItems.Clear
  1153.   ' The GetFolderContents will return a new instance of the
  1154.   ' XceedFtpFolderItems collection
  1155.   Dim xItems As XceedFtpFolderItems
  1156.   Set xItems = xFtp.GetFolderContents(txtFolderMask.Text, fcfCollection)
  1157.   ' Then, we can enumerate each item in the collection
  1158.   Dim xItem As XceedFtpFolderItem
  1159.   Dim xListItem As ListItem
  1160.   For Each xItem In xItems
  1161.     Set xListItem = lstContents.ListItems.Add(, , xItem.ItemName)
  1162.     Select Case xItem.ItemType
  1163.     Case fitFile
  1164.       xListItem.SubItems(1) = "file"
  1165.     Case fitFolder
  1166.       xListItem.SubItems(1) = "dir"
  1167.     Case fitLink
  1168.       xListItem.SubItems(1) = "link"
  1169.     End Select
  1170.   Next xItem
  1171. LocalError:
  1172.   Call AddErrorMessage(Err.Number, Err.Description)
  1173.   ' Update read-only properties
  1174.   Call UpdateReadOnlyProperties
  1175. End Sub
  1176. Private Sub btDeleteFile_Click()
  1177.   On Error GoTo LocalError
  1178.   ' No specific property required
  1179.   ' Simply call DeleteFile with the filename to delete
  1180.   Call xFtp.DeleteFile(txtRemoteFilename.Text)
  1181. LocalError:
  1182.   Call AddErrorMessage(Err.Number, Err.Description)
  1183.   ' Update read-only properties
  1184.   Call UpdateReadOnlyProperties
  1185. End Sub
  1186. Private Sub btReceiveFile_Click()
  1187.   On Error GoTo LocalError
  1188.   ' Set some properties
  1189.   xFtp.PassiveMode = (chkPassiveMode.Value = vbChecked)
  1190.   xFtp.RepresentationType = IIf(optASCII.Value, frtASCII, frtBinary)
  1191.   ' Reset progress bars
  1192.   barFile.Value = 0
  1193.   barGlobal.Value = 0
  1194.   ' Call the ReceiveFile method with the source and destination filenames,
  1195.   ' and the offset to start the transfer from.
  1196.   Call xFtp.ReceiveFile(txtSource.Text, Val(txtOffset.Text), txtDestination.Text)
  1197. LocalError:
  1198.   Call AddErrorMessage(Err.Number, Err.Description)
  1199.   ' Update read-only properties
  1200.   Call UpdateReadOnlyProperties
  1201. End Sub
  1202. Private Sub btReceiveMultipleFiles_Click()
  1203.   On Error GoTo LocalError
  1204.   ' Set some properties
  1205.   xFtp.PassiveMode = (chkPassiveMode.Value = vbChecked)
  1206.   xFtp.RepresentationType = IIf(optASCII.Value, frtASCII, frtBinary)
  1207.   ' Reset progress bars
  1208.   barFile.Value = 0
  1209.   barGlobal.Value = 0
  1210.   ' Call the ReceiveMultipleFiles method with the source mask, destination folder,
  1211.   ' and wether or not to process subfolders.
  1212.   Call xFtp.ReceiveMultipleFiles(txtSource.Text, txtDestination.Text, (chkRecursive.Value = vbChecked))
  1213. LocalError:
  1214.   Call AddErrorMessage(Err.Number, Err.Description)
  1215.   ' Update read-only properties
  1216.   Call UpdateReadOnlyProperties
  1217. End Sub
  1218. Private Sub btRenameFile_Click()
  1219.   On Error GoTo LocalError
  1220.   ' No specific property required
  1221.   ' Simply call RenameFile with the original and the new filename
  1222.   Call xFtp.RenameFile(txtRemoteFilename.Text, txtNewFilename.Text)
  1223. LocalError:
  1224.   Call AddErrorMessage(Err.Number, Err.Description)
  1225.   ' Update read-only properties
  1226.   Call UpdateReadOnlyProperties
  1227. End Sub
  1228. Private Sub btSendFile_Click()
  1229.   On Error GoTo LocalError
  1230.   ' Set some properties
  1231.   xFtp.AllocateStorage = (chkAllocateStorage.Value = vbChecked)
  1232.   xFtp.PassiveMode = (chkPassiveMode.Value = vbChecked)
  1233.   xFtp.RepresentationType = IIf(optASCII.Value, frtASCII, frtBinary)
  1234.   ' Reset progress bars
  1235.   barFile.Value = 0
  1236.   barGlobal.Value = 0
  1237.   ' Call the SendFile method with the source and destination filenames,
  1238.   ' the offset to start the transfer from, and wether or not to append to
  1239.   ' any existing file instead of overwriting.
  1240.   Call xFtp.SendFile(txtSource.Text, Val(txtOffset.Text), txtDestination.Text, (chkAppend.Value = vbChecked))
  1241. LocalError:
  1242.   Call AddErrorMessage(Err.Number, Err.Description)
  1243.   ' Update read-only properties
  1244.   Call UpdateReadOnlyProperties
  1245. End Sub
  1246. Private Sub btSendMultipleFiles_Click()
  1247.   On Error GoTo LocalError
  1248.   ' Set some properties
  1249.   xFtp.AllocateStorage = (chkAllocateStorage.Value = vbChecked)
  1250.   xFtp.PassiveMode = (chkPassiveMode.Value = vbChecked)
  1251.   xFtp.RepresentationType = IIf(optASCII.Value, frtASCII, frtBinary)
  1252.   ' Reset progress bars
  1253.   barFile.Value = 0
  1254.   barGlobal.Value = 0
  1255.   ' Call the SendMultipleFiles method with the source mask, destination folder,
  1256.   ' wether or not to append to any existing file instead of overwriting,
  1257.   ' and wether or not to look in subfolders for matching files.
  1258.   Call xFtp.SendMultipleFiles(txtSource.Text, txtDestination.Text, (chkAppend.Value = vbChecked), (chkRecursive.Value = vbChecked))
  1259. LocalError:
  1260.   Call AddErrorMessage(Err.Number, Err.Description)
  1261.   ' Update read-only properties
  1262.   Call UpdateReadOnlyProperties
  1263. End Sub
  1264. ' Xceed Ftp Library handled events
  1265. Private Sub xFtp_Disconnected()
  1266.   ' The connection with the FTP server was terminated.
  1267.   Call lstMessages.AddItem("Disconnected!")
  1268. End Sub
  1269. Private Sub xFtp_FileTransferStatus(ByVal sLocalFilename As String, _
  1270.                                     ByVal sRemoteFilename As String, _
  1271.                                     ByVal lFileSize As Long, _
  1272.                                     ByVal lBytesTransferred As Long, _
  1273.                                     ByVal nBytesPercent As Integer, _
  1274.                                     ByVal lTotalSize As Long, _
  1275.                                     ByVal lTotalBytesTransferred As Long, _
  1276.                                     ByVal nTotalBytesPercent As Integer, _
  1277.                                     ByVal lTotalFiles As Long, _
  1278.                                     ByVal lTotalFilesTransferred As Long, _
  1279.                                     ByVal nTotalFilesPercent As Integer, _
  1280.                                     ByVal lBytesPerSecond As Long, _
  1281.                                     ByVal lTotalBytesPerSecond As Long)
  1282.   ' Information about the current file transfer. We update the progress bars.
  1283.   barFile.Value = nBytesPercent
  1284.   barGlobal.Value = nTotalBytesPercent
  1285. End Sub
  1286. Private Sub xFtp_ListingFolderItem(ByVal sName As String, ByVal dtDate As Date, ByVal lFileSize As Long, ByVal eItemType As XceedFtpLibCtl.EXFFolderItemType, ByVal sUserData As String)
  1287.   ' The ListFolderContents method found an item!
  1288.   Dim xItem As ListItem
  1289.   Set xItem = lstContents.ListItems.Add(, , sName)
  1290.   Select Case eItemType
  1291.   Case fitFile
  1292.     xItem.SubItems(1) = "file"
  1293.   Case fitFolder
  1294.     xItem.SubItems(1) = "dir"
  1295.   Case fitLink
  1296.     xItem.SubItems(1) = "link"
  1297.   End Select
  1298. End Sub
  1299. Private Sub xFtp_LoggingCommandLine(ByVal sLine As String, ByVal eCommandType As XceedFtpLibCtl.EXFCommandType)
  1300.   ' Any incoming or outgoing command line.
  1301.   Call lstMessages.AddItem(IIf(eCommandType = fctClientCommand, "  > ", "  < ") & sLine)
  1302. End Sub
  1303. Private Sub xFtp_ReceivingFile(ByVal sRemoteFilename As String, sLocalFilename As String, ByVal lFileSize As Long)
  1304.   ' This file is about to be received.
  1305.   Call lstMessages.AddItem("Receiving " & sRemoteFilename & " as " & sLocalFilename)
  1306. End Sub
  1307. Private Sub xFtp_ReplacingFile(sFilename As String, ByVal dtDate As Date, ByVal lFileSize As Long, ByVal sRemoteFilename As String, eAction As XceedFtpLibCtl.EXFReplaceAction)
  1308.   ' This file already exists locally.
  1309.   Dim xAnswer As VbMsgBoxResult
  1310.   xAnswer = MsgBox("File " & sFilename & " already exists. Do you want to replace it?", vbYesNoCancel, "Existing file")
  1311.   Select Case xAnswer
  1312.   Case vbYes
  1313.     eAction = fraOverwrite
  1314.   Case vbNo
  1315.     eAction = fraSkip
  1316.   Case Else
  1317.     eAction = fraSkip
  1318.     xFtp.Abort = True
  1319.   End Select
  1320. End Sub
  1321. Private Sub xFtp_ScanningFolder(ByVal sFolder As String, bSkipFolder As Boolean)
  1322.   ' Scanning a folder for matching files.
  1323.   Call lstMessages.AddItem("Scanning the contents of " & sFolder)
  1324. End Sub
  1325. Private Sub xFtp_SendingFile(ByVal sLocalFilename As String, sRemoteFilename As String, ByVal lFileSize As Long)
  1326.   ' This file is about to be sent.
  1327.   Call lstMessages.AddItem("Sending file " & sLocalFilename & " as " & sRemoteFilename)
  1328. End Sub
  1329. Private Sub xFtp_SkippingFile(ByVal sLocalFilename As String, ByVal sRemoteFilename As String, ByVal eSkippingReason As XceedFtpLibCtl.EXFError)
  1330.   ' This file could not be transferred.
  1331.   Call lstMessages.AddItem("Skipping file " & sLocalFilename & " (" & xFtp.GetResultDescription(eSkippingReason) & ")")
  1332. End Sub
  1333.